package com.qianbao.dao.money;


import com.qianbao.domain.widthdraw.WidthdrawEntity;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

import java.util.List;

@Mapper
@Repository
public interface WidthdrawDao {

    /**
     * 插入一条记录
     * @param entity
     * @return
     */
    @Insert("INSERT INTO widthdraw_user_coin (widthdraw_id,custom_id,widthdraw_money,zfb_account,create_time) " +
            "VALUES(#{widthdraw_id},#{custom_id},#{widthdraw_money},#{zfb_account},#{create_time})")
    public int saveUserWidthdrawInfomation(WidthdrawEntity entity);


    /**
     * 查询一条记录
     * @param custom_id
     * @return
     */
    @Select("SELECT * FROM widthdraw_user_coin WHERE custom_id = #{custom_id}")
    public List<WidthdrawEntity> findUserWidthdrawInfomation(String custom_id);



}
